Preventing shortened lifetimes of security keys in a wireless communications security system

ABSTRACT

23A wireless communications device has a first security key, a second security key, and established channels. Each established channel has a corresponding security count value, and utilizes a security key. At least one of the established channels utilizes the first security key. The second security key is assigned to a new channel. A first set is then used to obtain a first value. The first set has only security count values of all the established channels that utilize the second key. The first value is at least as great as the x most significant bits (MSB&lt;SUB&gt;x&lt;/SUB&gt;) of the greatest value in the first set. The MSB&lt;SUB&gt;x &lt;/SUB&gt;of the initial security count value for the new channel is set equal to the first value. If the first set is empty, then the initial security count is set to zero.

BACKGROUND OF INVENTION

1. Field of the Invention

The present invention relates to security count values in a wirelesscommunications system. In particular, the present invention discloses amethod for obtaining a security count value for a new channel that isestablished during a changing of a security key.

2. Description of the Prior Art

Please refer to FIG. 1. FIG. 1 is a simplified block diagram of a priorart wireless communications system. The wireless communications systemincludes a first station 10 in wireless communications with a secondstation 20. As an example, the first station 10 is a mobile unit, suchas a cellular telephone, and the second station 20 is a base station.The first station 10 communicates with the second station 20 over aplurality of channels 12. The second station 20 thus has correspondingchannels 22, one for each of the channels 12. Each channel 12 has areceiving buffer 12 r for holding protocol data units (PDUs) 11 rreceived from the corresponding channel 22 of the second station 20.Each channel 12 also has a transmitting buffer 12 t for holding PDUs 11t that are awaiting transmission to the corresponding channel 22 of thesecond station 20. A PDU 11 t is transmitted by the first station 10along a channel 12 and received by the second station 20 to generate acorresponding PDU 21 r in the receiving buffer 22 r of the correspondingchannel 22. Similarly, a PDU 21 t is transmitted by the second station20 along a channel 22 and received by the first station 10 to generate acorresponding PDU 11 r in the receiving buffer 12 r of the correspondingchannel 12.

For the sake of consistency, the data structures of each PDU 11 r, 11 t,21 r and 21 t along corresponding channels 12 and 22 are identical. Thatis, a transmitted PDU 11 t generates an identical corresponding receivedPDU 21 r, and vice versa. Furthermore, both the first station 10 and thesecond station 20 use identical PDU 11 t, 21 t data structures. Althoughthe data structure of each PDU 11 r, 11 t, 21 r and 21 t alongcorresponding channels 12 and 22 is identical, different channels 12 and22 may use different PDU data structures according to the type ofconnection agreed upon along the corresponding channels 12 and 22. Ingeneral, though, every PDU 11 r, 11 t, 21 r and 21 t will have asequence number 5 r, 5 t, 6 r, 6 t. The sequence number 5 r, 5 t, 6 r, 6t is an m-bit number that is incremented for each PDU 11 r, 11 t, 21 r,21 t. The magnitude of the sequence number 5 r, 5 t, 6 r, 6 t indicatesthe sequential ordering of the PDU 11 r, 11 t, 21 r, 21 t in its buffer12 r, 12 t, 22 r, 22 t. For example, a received PDU 11 rwith a sequencenumber 5 r of 108 is sequentially before a received PDU 11 r with asequence number 5 r of 109, and sequentially after a PDU 11 r with asequence number 5 r of 107. The sequence number 5 t, 6 t is oftenexplicitly carried by the PDU 11 t, 21 t, but may also be implicitlyassigned by the station 10, 20. For example, in an acknowledged modesetup for corresponding channels 12 and 22, each transmitted PDU 11 t,successful reception of which generates an identical corresponding PDU21 r, is confirmed as received by the second station 20. A 12-bitsequence number 5 t is explicitly carried by each PDU 11 t inacknowledged mode transmissions. The second station 20 scans thesequence numbers 6 r embedded within the received PDUs 21 r to determinethe sequential ordering of the PDUs 21 r, and to determine if any PDUs21 r are missing. The second station 20 can then send a message to thefirst station 10 that indicates which PDUs 21 r were received by usingthe sequence numbers 6 r of each received PDU 21 r, or may request thata PDU It be re-transmitted by specifying the sequence number 5 t of thePDU 11 t to be re-transmitted. Alternatively, in a so-called transparenttransmission mode, data is never confirmed as successfully received. Thesequence numbers 5 t, 6 t are not explicitly carried in the PDUs 11 t,21 t. Instead, the first station 10 simply internally assigns a 7-bitsequence number 5 t to each PDU 11 t. Upon reception, the second station20 similarly assigns a 7-bit sequence number 6 r to each PDU 21 r.Ideally, the sequence numbers 5 t maintained by the first station 10 forthe PDUs 11 t are identical to the corresponding sequence numbers 6 rfor the PDUs 21 r that are maintained by the second station 20.

Hyper-frame numbers (HFNs) are also maintained by the first station 10and the second station 20. Hyper-frame numbers may be thought of ashigh-order (i.e., most significant) bits of the sequence numbers 5 t, 6t, and which are never physically transmitted with the PDUs 11 t, 21 t.Exceptions to this rule occur in rare cases of special signaling PDUs 11t, 21 t that are used for synchronization. In these cases, the HFNs arenot carried as part of the sequence number 11 t, 21 t, but instead arecarried in fields of the data payload of the signaling PDU 11 t, 21 t,and thus are more properly signaling data. As each transmitted PDU 11 t,21 t generates a corresponding received PDU 21 r, 11 r, hyper-framenumbers are also maintained for received PDUs 11 r, 21 r. In thismanner, each received PDU 11 r, 21 r, and each transmitted PDU 11 t, 21t is assigned a value that uses the sequence number (implicitly orexplicitly assigned) 5 r, 6 r, and 5 t, 6 t as the least significantbits, and a corresponding hyper-frame number (always implicitlyassigned) as the most significant bits. Each channel 12 of the firststation 10 thus has a receiving hyper-frame number (HFN_(R)) 13 r and atransmitting hyper-frame number (HFN_(T)) 13 t. Similarly, thecorresponding channel 22 on the second station 20 has a HFN_(R) 23 r anda HFN_(T) 23 t. When the first station 10 detects rollover of thesequence numbers 5 r of PDUs 11 r in the receiving buffer 12 r, thefirst station 10 increments the HFN_(R) 13 r. On rollover of sequencenumbers 5 t of transmitted PDUs 11 t, the first station 10 incrementsthe HFN_(T) 13 t. A similar process occurs on the second station 20 forthe HFN_(R) 23 r and HFN_(T) 23 t. The HFN_(R) 13 r of the first station10 should thus be synchronized with (i.e., identical to) the HFN_(T) 23t of the second station 20. Similarly, the HFN_(T) 13 t of the firststation 10 should be synchronized with (i.e., identical to) the HFN_(R)23 r of the second station 20.

The PDUs 11 t and 21 t are not transmitted “out in the open”. A securityengine 14 on the first station 10, and a corresponding security engine24 on the second station 20, together ensure secure and privateexchanges of data exclusively between the first station 10 and thesecond station 20. The security engine 14, 24 has two primary functions.The first is the obfuscation (i.e., ciphering, or encryption) of dataheld within a PDU 11 t, 21 t so that the corresponding PDU 11 r, 21 rpresents a meaningless collection of random numbers to an eavesdropper.The second function is to verify the integrity of data contained withinthe PDUs 11 r, 21 r. This is used to prevent another, improper, stationfrom masquerading as either the first station 10 or the second station20. By verifying data integrity, the first station 10 can be certainthat a PDU 11 r was, in fact, transmitted by the second station 20, andvice versa. For transmitting a PDU 11 t, the security engine 14 uses,amongst other inputs, an n-bit security count 14 c and a security key 14k to perform the ciphering functions upon the PDU 11 t. To properlydecipher the corresponding PDU 21 r, the security engine 24 must use anidentical security count 24 c and security key 24 k. Similarly, dataintegrity checking on the first station 10 uses an n-bit security countthat must be synchronized with a corresponding security count on thesecond station 20. As the data integrity security count is generated ina manner similar to that for the ciphering security count 14 c, 24 c,and as ciphering is more frequently applied, the ciphering securitycount 14 c, 24 c is considered in the following. The security keys 14 kand 24 k remain constant across all PDUs 11 tand 21 t (and thuscorresponding PDUs 21 r and 11 r), until explicitly changed by both thefirst station 10 and the second station 20. Changing of the securitykeys 14 k, 24 k is effected by a security mode command that involveshandshaking between the first station 10 and the second station 20 toensure proper synchronization of the security engines 14, 24. Thesecurity mode command is relatively infrequently performed, and dependsupon the value of the security count 14 c. They security keys 14 k, 24 kare thus relatively persistent. The security counts 14 c and 24 c,however, continuously change with each PDU 11 t and 21 t. This constantchanging of the security count 14 c, 24 c makes decrypting (andspoofing) of PDUs 11 t, 21 t more difficult, as it reduces statisticalconsistency of inputs into the security engine 14, 24. The securitycount 14 c for a PDU 11 t is generated by using the sequence number 5 tof the PDU 11 t as the least significant bits of the security count 14c, and the HFN_(T) 13 t associated with the sequence number 5 t as themost significant bits of the security count 14 c. Similarly, thesecurity count 14 c for a PDU 11 r is generated from the sequence number5 r of the PDU 11 r and the HFN_(R) 13 r of the PDU 11 r. An identicalprocess occurs on the second station 20, in which the security count 24c is generated using the sequence number 6 r or 6 t, and the appropriateHFN_(R) 23 r or HFN_(T) 23 t. The security count 14 c, 24 c has a fixedbit size, say 32 bits. As the sequence numbers 5 r, 6 r, 5 t, 6 t mayvary in bit size depending upon the transmission mode used, thehyper-frame numbers HFN_(R) 13 r, HFN_(R) 23 r, HFN_(T) 13 t and HFN_(T)23 t must vary in bit size in a corresponding manner to yield the fixedbit size of the security count 14 c, 24 c. For example, in a transparenttransmission mode, the sequence numbers 5 r, 6 r, 5 t, 6 t are all 7bits in size. The hyper-frame numbers HFN_(R) 13 r, HFN_(R) 23 r,HFN_(T) 13 t and HFN_(T) 23 t are thus 25 bits in size; combining thetwo together yields a 32 bit security count 14 c, 24 c. On the otherhand, in an acknowledged transmission mode, the sequence numbers 5 r, 6r, 5 t, 6 t are all 12 bits in size. The hyper-frame numbers HFN_(R) 13r, HFN_(R) 23 r, HFN_(T) 13 t and HFN_(T) 23 t are thus 20 bits in sizeso that combining the two together continues to yield a 32 bit securitycount 14 c, 24 c.

Initially, there are no established channels 12 and 22 between the firststation 10 and the second station 20. The first station 10 thusestablishes a channel 12 with the second station 20. To do this, thefirst station 10 must determine an initial value for the HFN_(T) 13 tand HFN_(R) 13 r. The first station 10 references a non-volatile memory16, such as a flash memory device or a SIM card, for a start value 16 s,and uses the start value 16 s to generate the initial value for theHFN_(T) 13 t and the HFN_(R) 13 r. The start value 16 s holds the x mostsignificant bits (MSB_(x)) of a hyper-frame number from a previoussession along a channel 12. Ideally, x should be at least as large asthe bit size of the smallest-sized hyper-frame number (i.e., for theabove example, x should be at least 20 bits in size). The MSB_(x) of theHFN_(T) 13 t and the HFN_(R) 13 r are set to the start value 16 s, andthe remaining low order bits are set to zero. The first station 10 thentransmits the start value 16 s to the second station 20 (by way of aspecial signaling PDU 11 t) for use as the HFN_(R) 23 r and the HFN_(T)23 t. In this manner, the HFN_(T) 13 t is synchronized with the HFN_(R)23 r, and the HFN_(T) 23 t is synchronized with the HFN_(R) 13 r.

As noted, the first station 10 may establish a plurality of channels 12with the second station 20. Each of these channels 12 uses its ownsequence numbers 5 r and 5 t, and hyper-frame numbers 13 r and 13 t.When establishing a new channel 12, the first station 10 considers theHFN_(T) 13 t and HFN_(R) 13 r of all currently established channels 12,selecting the HFN_(T) 13 tor HFN_(R) 13 r having the highest value. Thefirst station 10 then extracts the MSB_(x) of this highest-valuedhyper-frame number 13 r, 13 t, increments the MSB_(x) by one, and usesit as the MSB_(x) for the new HFN_(T) 13 t and HFN_(R) 13 r for a newlyestablished channel 12. Synchronization is then performed between thefirst station 10 and the second station 20 to provide the MSB_(x) to thesecond station 20 for the HFN_(R) 23 r and HFN_(T) 23 t. In this manner,a constantly incrementing spacing is ensured between the security counts14 c of all established channels 12.

It is noted that, for the sake of security, the security keys 14 k and24 k should be changed after a predetermined interval. This interval is,in part, determined by the security count 14 c, 24 c. When the securitycount 14 c for an established channel 12 exceeds a predeterminedsecurity cross-over value 14 x, the second station 20 (i.e., the basestation) may initiate the security mode command to change the securitykeys 14 k and 24 k to new security keys 14 n and 24 n. Both of thesecurity keys 14 n and 24 n are identical, and should not be the same asthe previous security keys 14 k and 24 k. Changing over to the newsecurity keys 14 n, 24 n must be carefully synchronized across allchannels 12, 22 to ensure that that transmitted PDUs 11 t, 21 tareproperly deciphered into received PDUs 21 r, 11 r. For example, if a PDU11 t is enciphered using the security key 14 k and the security engine24 attempts to decipher the corresponding received PDU 21 r using thenew security key 24 n, the received PDU 21 r will be deciphered intomeaningless data due to the lack of synchronization of the security keys14 k and 24 n as applied to the PDUs 11 t and 21 r. The security modecommand is a somewhat complicated process that takes a finite amount oftime. Clearly, before the transmitting of the security mode command bythe second station 20, only the security key 14 k, 24 k is used for allchannels 12, 22. Similarly, after the security mode command has beenfully completed, only the new security key 14 n, 24 n will be used forall channels 12, 22. However, during execution of the security modecommand, and the resulting hand-shaking between the two stations 10 and20, there could be confusion as to which security key 14 k, 24 k, or 14n, 24 n should be used. To prevent this from happening, the securitymode command provides for a so-called activation time 17 r, 27 t foreach channel 12, 22. The activation time 17 r, 27 t is simply a sequencenumber value 5 r, 6 t of PDUs 11 r, 21 t. When executing the securitymode command, the second station 20 determines an activation time 27 tfor the transmitting buffer 22 t of each channel 22. The activationtimes 27 t are not necessarily the same across all channels 22, and, infact, will generally be different. The security mode command sent by thesecond station 20 to the first station 10 provides the activation times27 t to the first station 10, which the first station 10 then uses togenerate an identical corresponding activation time 17 r for thereceiving buffer 12 r of each channel 12. In response to the securitymode command, the first station 10 determines an activation time 17 tfor the transmitting buffer 12 t of each channel 12. The first station10 then sends a security mode complete message to the second station 20,which contains the activation times 17 t. The second station 20 uses thesecurity mode complete message to provide an activation time 27 r to thereceiving buffer 22 r of each channel 22, which is identical to theactivation time 17 t of the corresponding channel 12 on the firststation 10. The security mode command, and resultant final activationtime 17 t, are termed a security mode reconfiguration. Using the firststation 10 as an example, for all PDUs 11 t that have sequence numbers 5t that are prior to the activation time 17 t for their channel 12, thePDUs 11 t are enciphered using the old security key 14 k. For PDUs 11 twhich have sequence numbers 5 t that are sequentially at or after theactivation time 17 t, the new security key 14 n is applied forenciphering. When receiving the PDUs 11 t, the second station 20 usesthe sequence numbers 6 r and the activation time 27 r to determine whichkey 24 k or 24 n to use for deciphering of the PDUs 21 r. A similartransmitting process also occurs on the second station 20, with eachchannel 22 having the activation time 27 t. The security mode commandprovides for synchronization of the activation times 17 r with 27 t and17 t with 27 r so that the second station 20 and first station 10 mayknow how to apply their respective security keys 24 n, 24 k and 14 n, 14k to received PDUs 21 r, 11 r and transmitted PDUs 11 t, 21 t. In thismanner, synchronization is ensured between the security engines 14 and24. To ensure that full use is obtained from the new security key 14 n,24 n, upon adoption of the new security key 14 n, 24 n by a channel 12,22 (i.e., after the activation times 17 r, 17 t and 27 r, 27 t for thechannels 12 and 22), the HFN_(R) 13 r, 23 r and the HFN_(T) 13 t, 23 tare cleared to zero, thus bringing the security count 14 c, 24 c for thechannel 12, 22 down to zero, or close to zero. For example, after achannel 12 exceeds its activation time 17 t, the HFN_(T) 13 t for thechannel 12 is set to zero. The corresponding security count 14 c for thetransmitted PDUs 11 t is thus brought close to zero. Similarly, uponreceiving a PDU 21 r that exceeds the activation time 27 r, the secondstation 20 clears the HFN_(R) 23 r, thus reducing the security count 24c for the received PDUs 21 r.

However, the establishment of a new channel 12 during the security modereconfiguration may lead to a problem that shortens the lifetime of thenew security key 14 n. When a new channel 12 is being established duringthe security mode reconfiguration, it is possible that there will beestablished channels 12 that are using the new security key 14 n, andother channels 12 that are still using the old security key 14 k. Thosechannels 12 using the new security key 14 n will have hyper-framenumbers 13 r, 13 t that are zero, or close to zero. However, thosechannels 12 still using the old security key 14 k (because they have notyet reached their respective activation times 13 a) will havehyper-frame numbers 13 r, 13 t that are quite high. When assigning thehyper-frame numbers 13 r, 13 t to the new channel 12, the first station10 scans all established channels 12, selects the highest hyper-framenumber 13 r, 13 t, increments this value by one and then assigns it tothe hyper-frame numbers 13 r and 13 t for the new channel 12. The newchannel 12 will thus receive hyper-frame numbers 13 r, 13 t that aremuch greater than zero, and which may possibly lead to the formation ofa security count 14 c for the new channel 12 that is very close to thesecurity cross-over value 14 x. This will cause a considerableshortening of the lifetime of the new security key 14 n.

SUMMARY OF INVENTION

It is therefore a primary objective of this invention to provide amethod for obtaining a security count value for a new channel that isestablished during a changing of a security key.

Briefly summarized, the preferred embodiment of the present inventiondiscloses a method for calculating an initial security count value for anew channel in a wireless communications device. The wirelesscommunications device has a first security key, a second security key,and established channels. Each established channel has a correspondingsecurity count value, and utilizes a security key. At least one of theestablished channels utilizes the first security key. The secondsecurity key is assigned to the new channel. A first set is then used toobtain a first value. The first set has only security count values ofall the established channels that utilize the second key. The firstvalue is at least as great as the x most significant bits (MSB_(x)) ofthe greatest value in the first set. The MSB_(x) of the initial securitycount value for the new channel is set equal to the first value. If thefirst set is empty, then the first value is set to zero.

It is an advantage of the present invention that by considering thesecurity count values associated with only those channels that use thesecond key, the new channel is prevented from obtaining an excessivelyhigh security count value. The lifetimes of security keys are thusprevented from being prematurely shortened.

These and other objectives of the present invention will no doubt becomeobvious to those of ordinary skill in the art after reading thefollowing detailed description of the preferred embodiment, which isillustrated in the various figures and drawings.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a simplified block diagram of a prior art wirelesscommunications system.

FIG. 2 is a simplified block diagram of a wireless communications systemaccording to the present invention.

DETAILED DESCRIPTION

In the following description, a station may be a mobile telephone, ahandheld transceiver, a base station, a personal data assistant (PDA), acomputer, or any other device that requires a wireless exchange of data.It should be understood that many means may be used for the physicallayer to effect wireless transmissions, and that any such means may beused for the system hereinafter disclosed.

Please refer to FIG. 2. FIG. 2 is a simplified block diagram of awireless communications system 30 according to the present invention.The wireless communications system 30 is much like that of the priorart, as it is the primary objective of the present invention to changethe method used for assigning an initial security count value 44 c, 54 cto a newly established channel 42, 52. The wireless communicationssystem 30 includes a first station 40 in wireless communications with asecond station 50 over a plurality of established channels 42. The firststation 40 may establish a channel 42 to effect communications with thesecond station 50. The second station 50 establishes a correspondingchannel 52 for the channel 42 of the first station 40. The first station40 may also release an established channel 42, in which case the secondstation 50 releases the corresponding channel 52. Each channel 42 has areceiving buffer 42 r and a transmitting buffer 42 t. Similarly, on thesecond station 50, each channel 52 has a receiving buffer 52 r and atransmitting buffer 52 t. The receiving buffer 42 r is used to holdprotocol data units (PDUs) 41 r received from the second station 50. Thetransmitting buffer 42 t is used to hold PDUs 41 t awaiting transmissionto the second station 50. A PDU 41 t is transmitted along its channel 42to the second station 50, where it is received and placed into thereceiving buffer 52 r of the corresponding channel 52. Similarly, a PDU51 t is transmitted along its channel 52 to the first station 40, whereit is received and placed into the receiving buffer 42 r of thecorresponding channel 42. Each PDU 41 r, 41 t, 51 r, 51 t has an m-bitsequence number (SN) 35 r, 35 t, 36 r, 36 t that indicates thesequential position of the PDU 41 r, 41 t, 51 r, 51 t within itsrespective buffer 42 r, 42 t, 52 r, 52 t. Sequentially later PDUs 41 r,41 t, 51 r, 51 t have sequentially higher sequence numbers 35 r, 35 t,36 r, 36 t. As the sequence number 35 r, 35 t, 36 r, 36 t has a fixedbit size of m bits, the sequence number 35 r, 35 t, 36 r, 36 t willrollover to zero when its value exceeds 2^(m)−1. The receiving buffers42 r, 52 r each have a respective receiving hyper-frame number (HFN_(R))43 r, 53 r that is incremented by one upon detection of such a rolloverevent of the sequence number 35 r, 36 r of received PDUs 41 r, 51 r. TheHFN_(R) 43 r, 53 r associated with each received PDU 41 r, 51 r thusserves as high-order bits (most significant bits) for the sequencenumber 35 r, 36 r of the received PDU 41 r, 51 r. Similarly, eachtransmitting buffer 42 t, 52 t has a respective transmitting hyper-framenumber (HFN_(T)) 43 t, 53 t that serves as the high-order, mostsignificant bits of the sequence number 35 t, 36 t of each transmittedPDU 41 t, 51 t. The hyper-frame numbers 43 r, 43 t, 53 r, 53 t areinternally maintained by the first station 40 and second station 50, andare explicitly transmitted only during synchronization events. This isin contrast to the sequence numbers 35 t, 36 t, which are typicallycarried by their respective PDUs 41 t, 51 t.

The first station 40 has a security engine 44 that is used to performenciphering/deciphering and data integrity checks of the PDUs 41 r, 41t. Two of a multiple of inputs into the security engine particularlyinclude an n-bit security count 44 c, and a first security key 44 k. Acorresponding security engine 54 is provided on the second station 50,which also uses an n-bit security count 54 c and a first security key 54k. A PDU 41 t is enciphered by the security engine 44 using a distinctsecurity count 44 c, and the first key 44 k. To properly decipher thecorresponding received PDU 52 r, the security engine 54 must use asecurity count 54 c that is identical to the security count 44 c, andthe first security key 54 k that is identical to the first security key44 k. Integrity checking of PDUs 41 r, 41 t, 51 r, 51 t also utilizessynchronized security counts, but as these integrity security counts arealmost invariably smaller than the ciphering security counts 44 c, 54 c,for purposes of the following discussion it is the ciphering securitycounts 44 c, 54 c that are considered.

The first security keys 44 k and 54 k are changed whenever the securitycount 44 c for any established channel 42 exceeds a predeterminedcross-over value 44 x. A security mode command is used to synchronizethe security engines 44 and 54 from using the first security key 44 c,54 c to using a second, new security key 44 n, 54 n. The security count44 c, 54 c continuously changes with each PDU 41 r, 41 t, 51 r, 51 talong the channel 42, 52. The security count 44 c is generated for eachPDU 41 r, 41 t by using the sequence number 35 r, 35 t of the PDU 41 r,41 t as the low-order (least significant) bits of the security count 44c, and the HFN_(R) 43 r, HFN_(T) 43 t, respectively associated with thePDU 41 r, 41 t, as the high-order bits of the security count 44 c. Acorresponding process is used by the security engine 54 of the secondstation 50. For a stream of transmitted PDUs 41 t along an establishedchannel 42, the security count 44 c associated with the channel 12continuously increases with each PDU 41 t. The same is thus also truefor streams of PDUs 51 t transmitted by the second station 50. The rangeof security count values 44 c used by the various channels 42 may varywidely. Typically, all channels 42 will use either the first securitykey 44 k or the second security key 44 n.

Initially, the first station 40 has no established channels 42 with thesecond station 50. To establish a channel 42 with the second station 50,the first station 40 first extracts a start value 46 s from anon-volatile memory 46 of the first station 40, and uses this startvalue 46 s to generate the HFN_(T) 43 t and the HFN_(R) 43 r for thechannel 42 that is to be established. The non-volatile memory 46 is usedto permanently store data for the first station 40, and may be anelectrically erasable programmable read-only memory (EEPROM), a SIMcard, or the like, so that the start value 46 s is not lost when thefirst station 40 is turned off. Ideally, the bit size of the start value46 s should be equal to the bit size of the hyper-frame numbers 43 t and43 r. In this case, the HFN_(T) 43 t and the HFN_(R) 43 r are simply setequal to the start value 46 s. If, however, the start value 46 s is xbits in size for m-bit hyper-frame number 43 t, 43 r, and x is less thanm, then the start value 46 s is used as the x most significant bits(MSB_(x)) of the hyper-frame numbers 43 t, 43 r, and the remaininglow-order bits of HFN_(T) 43 t and HFN_(R) 43 r are simply set to zero.After generating the hyper-frame numbers 43 t and 43 r by way of thestart value 46 s, the first station 40 transmits the start value 46 s(or, alternatively, one of HFN_(T) 43 t or HFN_(R) 43 r) to the secondstation 50 so that the second station 50 may set the HFN_(R) 53 r andthe HFN_(T) 53 t of the corresponding channel 52 equal to the initialvalue of the hyper-frame numbers 43 t and 43 r. In this manner, theHFN_(T) 43 t is synchronized with the corresponding HFN_(R) 53 r, andthe HFN_(R) 43 r is synchronized with the corresponding HFN_(T) 53 t. Asthe start value 46 s is an x-bit sized number, and the HFN_(T) 43 t isused as the most significant bits of the security count 44 c fortransmitted PDUs 41 t, the start value 46 s effectively holds theMSB_(x) of the n-bit security count 44 c, where n is equal to the sum ofthe bit size of the HFN_(T) 43 t and the bit size of the sequence number35 t. This is also true for the security count 44 c for received PDUs 41r, as regards HFN_(R) 43 r. A security key is also assigned to the newlyestablished channel 42, such as the first security key 44 k, which isthen used by the security engine 44 for ciphering and decipheringoperations of the new channel 42 Many other channels 42 may beestablished by the first station 40 (or in response to a channel 52being established by the second station 50) after an initial channel 42has been established. When establishing a new channel 42 when otherchannels 42 are already established, the first station 40 first assignsa security key to the new channel 42. The security key will typically bethe security key that is already in use by all other establishedchannels 42, such as the first security key 44 k. However, due to asecurity mode command, the new channel 42 may be assigned a secondsecurity key, such as the new security key 44 n, that is different fromthat of other established channels 42. By way of example, it is assumedin the following that the first station 40 assigns the new security key44 n to a new channel 42. The first station 40 must next assignhyper-frame numbers 43 r and 43 t to the new channel 42. To do this, thefirst station 40 parses all other established channels 42 that also usethe new security key 44 n (i.e., the same security key that is assignedto the new channel 42) at the time the new channel 42 is beingestablished, and selects the greatest security count 44 c from all ofthese channels 42. This greatest security count 44 c may be formed fromeither a receiving hyper-frame number HFN_(R) 43 r, or a transmittinghyper-frame number HFN_(T) 43 t, and is used to generate the hyper-framenumbers 43 r, 43 t of the new channel 42. For simplicity in thefollowing discussion, it is assumed that the hyper-frame numbers 43 r,43 t of the new channel 42 are both x bits in size, and that the x mostsignificant bits (MSB_(x)) of this so-called greatest security count 44c are copied into a temporary holding space as a first value 45. Forexample, if the hyper-frame numbers 43 r, 43 t for the new channel 42are 20 bits in size, then the MSB₂₀ of the greatest security count 44 c(associated with the new security key 44 n) are used as the first value45. The first value 45 is then incremented if the first value 45 is lessthan 2^(x)−1, so as to ensure that no rollover to zero (i.e., over-flow)occurs. The first value 45 is then copied into the HFN_(R) 43 r and theHFN_(T) 43 t of the new channel 42. Note that if no other establishedchannels 42 are using the new security key 44 n (i.e., the same securitykey that is being used by the new channel 42) at the time that the newchannel 42 is being established, then the hyper-frame values 43 r and 43t for the new channel 42 are simply set to zero. That is, the firstvalue 45 is given a default value of zero, which becomes the value forthe hyper-frame numbers 43 r and 43 t. Alternatively, as zero issometimes used as a flag, another small value, such as one, may be used.

Note that the above is, in fact, setting the MSB_(x) of an initial valuefor the security counts 44 c (one for the receiving buffer 42 r, anotherfor the transmitting buffer 42 t) for the new channel 42 according tothe MSB_(x) of the security counts 44 c of other established channel 42that use the same security key 44 n as is used by the new channel 42. Ineffect, a set 48 of elements 48 e is parsed. Each element 48 e is asecurity count 44 c for either a receiving buffer 42 r or a transmittingbuffer 42 t of a channel 42 that uses the new security key 44 n. Eachand every security count 44 c that is associated with the new securitykey 44 n is represented as an element 48 e in the set 48. Each channel42 that uses the new security key 44 n thus provides two elements 48 eto the set 48. The MSB_(x) of the largest element 48 e in this set 48are then extracted, incremented, and used as the MSB_(x) for thesecurity counts 44 c for the receiving buffer 42 r and transmittingbuffer 42 t of the new channel 42, by way of the hyper-frame numbers 43r and 43 t of the new channel 42.

The present invention method is particularly important for thedetermination of the hyper-frame numbers 43 r, 43 t of a new channel 42that is established just after, or during, a security modereconfiguration. Initially, a plurality of channels 42 are established,each using the first security key 44 k. A security mode command isperformed some time later, which culminates in a receiving activationtime 49 r for each receiving buffer 42 r, and a transmitting activationtime 49 t for each transmitting buffer 42 t. After reception of thesecurity mode command, when the sequence numbers 35 r, 35 t of PDUs 41r, 41 t exceed their respective buffer 42 r, 42 t activation times 49 r,49 t, the respective hyper-frame number 43 r, 43 t is cleared to zero,and the second, new security key 44 n is then applied to the PDUs 41 r,41 t. As an example, consider a stream of PDUs 41 t in a transmittingbuffer 42 t having sequence numbers 35 t ranging from 18 to 35. Furtherassume that this transmitting buffer 42 t has an HFN_(T) 43 t of 168,and an activation time 49 t of 30. After reception of the security modecommand, the PDUs 41 t with sequence numbers 35 t from 18 to 29 aretransmitted using the first security key 44 k, and security counts 44 cwith most significant bits (MSBs) given by the HFN_(T) value 43 t of168. PDUs 41 t with sequence numbers 35 t from 30 to 35, however, aretransmitted using the second security key 44 n, and security counts 44 cwith most significant bits (MSBs) given by a new HFN_(T) value 43 t ofzero. When establishing a new channel 42, the second, new security key44 n is assigned to this new channel 42. The first station 40 thenconsiders every buffer 42 r, 42 t that has reached or exceeded itsrespective activation time 49 r, 49 t, and is thus using the newsecurity key 44 n at the time that the new channel 42 is beingestablished. The largest security count 44 c of such buffers 42 r, 42 tis then used in the manner previously described to generate thehyper-frame numbers 43 r, 43 t for the new channel 42. Again, if no suchbuffers 42 r, 42 t exist, then the hyper-frame numbers 43 r, 43 t forthe new channel 42 are simply set to a default value, such as zero. Notethat no security count values 44 c are considered for buffers 42 r, 42 tthat have not reached or exceeded their respective activations times 49r, 49 t, and which thus continue to use the first security key 44 k.Because of this, the present invention avoids entangling hyper-framenumbers 43 r, 43 t that properly associate with the first security key44 k when assigning values to hyper-frame numbers 43 r, 43 t thatassociate with the second, new security key 44 n. In this manner, thelifetime of the new security key 44 n is not prematurely shortened dueto an initial assignment of unduly high hyper-frame numbers 43 r, 43 t.As before, the above description of the present invention method may bethought of as the parsing of a set 48 that contains all security countvalues 44 c (as elements 48 e) that are associated with the second, newkey 44 n at the time that the new channel 42 is initiated forestablishment. The MSB_(x) of the largest-valued element 48 e in thisset 48 are extracted, incremented, and used for the x-bit hyper-framenumbers 43 r, 43 t of the new channel 42, thus providing the MSB_(x) forthe initial values of the security counts 44 c of the new channel 42.

In contrast to the prior art, the present invention only considerssecurity count values associated with a second security key whenassigning an initial security count value to a new channel that uses thesecond security key. Security count values associated with the firstsecurity key thus do not influence the calculation of the new securitycount value for the new channel, and so do not lead to a prematurelyshortened lifetime for the second security key.

Those skilled in the art will readily observe that numerousmodifications and alterations of the device may be made while retainingthe teachings of the invention. Accordingly, the above disclosure shouldbe construed as limited only by the metes and bounds of the appendedclaims.

1. A method for calculating an initial security count value for a newchannel in a wireless communications device, the wireless communicationsdevice comprising: a first security key; a second security key; and aplurality of established channels, each established channel having acorresponding security count value and utilizing a security key, atleast one of the established channels utilizing the first security key;the method comprising: assigning the second security key to the newchannel; utilizing a first set to obtain a first value, the first setconsisting of corresponding security count values of the establishedchannels that utilize the second key, the first value being at least asgreat as the x most significant bits (MSB_(x)) of a value in the firstset; and setting the MSB_(x) of the initial security count value for thenew channel equal to the first value; wherein if the first set is empty,then the first value is set to a first predetermined value.
 2. Themethod of claim 1 wherein the first predetermined value is zero.
 3. Themethod of claim 2 wherein the first value is at least as great as theMSB_(x) of the greatest value in the first set.
 4. The method of claim 3wherein the first value is greater than the MSB_(x) of the greatestvalue in the first set.
 5. A method for providing an initial securitycount value to a new channel in a wireless communications device, themethod comprising: establishing at least a first channel, each firstchannel utilizing a first security key and having a correspondingsecurity count value; performing a security mode reconfiguartion tochange utilization of each first channel from the first security key toa second security key according to an activation time for each firstchannel; wherein upon utilization of the second security key, thecorresponding security count value for the first channel is changed;initiating establishment of a second channel that utilizes the secondsecurity key; utilizing a first set to obtain a first value, the firstset consisting of corresponding security count values of the establishedchannels that utilize the second key, the first value being at least asgreat as the x most significant bits (MSB_(x)) of a value in the firstset; and setting the MSB_(x) of the initial security count value for thesecond channel equal to the first value; wherein if the first set isempty, then the first value is set to a first predetermined value. 6.The method of claim 5 wherein the first set includes the correspondingsecurity count values of all first channels utilizing the secondsecurity key when initiating the establishment of the second channel. 7.The method of claim 6 wherein the predefined value is zero.
 8. Themethod of claim 5 wherein the first value is at least as great as theMSB_(x) of the greatest value in the first set.
 9. The method of claim 8wherein the first value is greater than the MSB_(x) of the greatestvalue in the first set.